home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DOS.SWG / 0052_Lockup!.pas < prev    next >
Pascal/Delphi Source File  |  1994-05-25  |  782b  |  38 lines

  1. {
  2. Hello All!
  3.  
  4. Here's a little procedure that just poped into mind.  It's a good way to
  5. prevent unathorized usage of a certain task.
  6.  
  7. { ------- CUT HERE ------- }
  8.  
  9. Program LockItUp;
  10.  
  11. Const
  12.    Lock = $1234;
  13.  
  14. Procedure Lockup(Key: Word); Assembler;
  15. ASM
  16.       MOV  CX, Key
  17.       SUB  CX, Lock
  18. @@1:  INC  CX
  19.       LOOP @@1
  20. End;
  21.  
  22. Begin
  23.    Lockup($1234);
  24.    WriteLn('Key works!');
  25. End.
  26.  
  27. { ------- CUT HERE ------- }
  28.  
  29. You could give someone a registration code who's CRC value will result in the
  30. same value as your Lock and if an incorrect value is entered, their system will
  31. lock up (at least that task will).
  32.  
  33. Try running the program with Lockup($1235) and see what happens.  (Make sure
  34. you don't have anything important in memory!)
  35.  
  36. Just an idea..
  37.  
  38.